<template>
	<block v-if="unknow">
		<fui-tag :size="size" :padding="['12rpx','14rpx']" :text="plate_number" background="#c2c2c2" color="#fff" borderColor="#c2c2c2"></fui-tag>
	</block>
	<block v-else>
		<fui-tag :size="size" v-if="color" :type="color" :text="plate_number" :padding="['12rpx','14rpx']"></fui-tag>
		<fui-tag :size="size" v-if="plate_type=='black'" :text="plate_number" :padding="['12rpx','14rpx']" background="#484848" color="#fff" borderColor="#484848"></fui-tag>
		<fui-tag :size="size" v-if="plate_type=='white'" :text="plate_number" :padding="['12rpx','14rpx']" background="#fff" color="#484848" borderColor="#d9d9d9"></fui-tag>
	</block>
</template>

<script>
	import {methods} from '@/utils/core.js';
	export default {
		name:'plate-type',
		data() {
			return {
				unknow:false,
				colorArr:{
					blue:'primary',
					green:'success',
					yellow:'warning',
					black:'',
					white:''
				},
				color:''
			}
		},
		props:{
			plate_number:{
				type: String,
				require: true
			},
			plate_type:{
				type: String,
				default:''
			},
			size:{
				type:Number,
				default:24
			}
		},
		mounted(){
			this.color=this.colorArr[this.plate_type];
			if(this.plate_type===''){
				this.unknow=true;
			}
		},
		methods: {
			...methods,
			
		}
	}
</script>

<style lang="scss" scoped>
	
</style>